<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="<s:url value='/resources/css/control.style.css'/>" />
<link rel="stylesheet" type="text/css" href="<s:url value='/resources/css/control.theme.css'/>" />
<script src="<s:url value='/resources/js/jquery/jquery-1.5.2.min.js'/>" type="text/javascript"></script>
<script src="<s:url value='/resources/js/car/control.datagrid.js'/>" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	
	var searchClick = false;
	$('#dataGrid').DataGrid({
		url: '<s:url value="/control/findGuideSigns.do"/>',
		pageSize: 10,
		columns:[
			{field:'id',title:'序号',width: '8%',align:'center'},
			{field:'tourCode',title:'行程单号',width:'15%',align:'center'},
			{field:'tourName',title:'行程名称',width:'25%'},
			{field:'guideName',title:'导游电话',width:'10%',align:'center'},
			{field:'placeName',title:'签到地点',width:'22%',align:'center'},
			{field:'signInTime',title:'签到时间',width:'10%',align:'center'},
			{field:'signOutTime',title:'签出时间',width:'10%',align:'center', formatter:function(value){
				if(value == null)return '未签出';
			}}
		],
		onBeforeLoad: function(param){
			if(searchClick){
				var tourcode = $('#tourcode').val();
				var placeType = $('#placeType').val();
				if(tourcode != "")param['sign.tourCode'] = tourcode;
				if(placeType != "0")param['sign.placeType'] = placeType;
			}
		},
		onLoadSuccess: function(total,rows){
			if(parent.reSetHeight){
				parent.reSetHeight(rows.length*20);
			}
		}
	});
	
	$('#btnSearch').bind('click',function(){
		searchClick = true;
		$('#dataGrid').DataGrid('reload');
	});
});
</script>
<title>导游签到查询</title>
</head>
<body>
	<div id="box">
		<h3>导游签到查询</h3>
		<table>
			<tr>
				<td>行程单号：<input id="tourcode" type="text" value="" style="width: 150px;" />
					&nbsp;&nbsp; 
					签到场所类型：
					<select id="placeType" style="width: 150px;">
						<option value="0" selected="selected">--全部--</option>
						<option value="1">景区签到</option>
						<option value="2">宾馆场所签到</option>
						<option value="3">用餐场所签到</option>
						<option value="4">购物场所签到</option>
					</select>
					<input type="submit" id="btnSearch" value="搜索" id="btnSearch"/></td>
			</tr>
		</table>
		<div id="dataGrid"></div>
	</div>
</body>
</html>